package com.data.modules.online.config.datasourceConfig;

import com.alibaba.fastjson.JSONObject;
import com.data.modules.online.cgform.entity.OnlCgformField;
import com.data.modules.online.cgform.util.CgformUtil;
import com.data.modules.online.cgreport.entity.OnlCgreportItem;

public class OnlineFieldConfig {

    private String f422a;

    private String f423b;

    private String f424c;

    private String f425d;

    private String f426e;

    private String f427f;

    private Integer f428g;

    private String f429h;

    private String f430i;

    private String f431j;


    public boolean mo1265a(Object obj) {
        return obj instanceof OnlineFieldConfig;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof OnlineFieldConfig)) {
            return false;
        }
        OnlineFieldConfig eVar = (OnlineFieldConfig) o;
        if (!eVar.mo1265a(this)) {
            return false;
        }
        Integer isSearch = getIsSearch();
        Integer isSearch2 = eVar.getIsSearch();
        if (isSearch != null ? !isSearch.equals(isSearch2) : isSearch2 != null) {
            return false;
        }
        String name = getName();
        String name2 = eVar.getName();
        if (name != null ? !name.equals(name2) : name2 != null) {
            return false;
        }
        String type = getType();
        String type2 = eVar.getType();
        if (type != null ? !type.equals(type2) : type2 != null) {
            return false;
        }
        String view = getView();
        String view2 = eVar.getView();
        if (view != null ? !view.equals(view2) : view2 != null) {
            return false;
        }
        String mode = getMode();
        String mode2 = eVar.getMode();
        if (mode != null ? !mode.equals(mode2) : mode2 != null) {
            return false;
        }
        String val = getVal();
        String val2 = eVar.getVal();
        if (val != null ? !val.equals(val2) : val2 != null) {
            return false;
        }
        String rule = getRule();
        String rule2 = eVar.getRule();
        if (rule != null ? !rule.equals(rule2) : rule2 != null) {
            return false;
        }
        String mainField = getMainField();
        String mainField2 = eVar.getMainField();
        if (mainField != null ? !mainField.equals(mainField2) : mainField2 != null) {
            return false;
        }
        String mainTable = getMainTable();
        String mainTable2 = eVar.getMainTable();
        if (mainTable != null ? !mainTable.equals(mainTable2) : mainTable2 != null) {
            return false;
        }
        String table = getTable();
        String table2 = eVar.getTable();
        if (table == null) {
            if (table2 == null) {
                return true;
            }
        } else if (table.equals(table2)) {
            return true;
        }
        return false;
    }

    public int hashCode() {
        int i = 43;
        Integer isSearch = getIsSearch();
        int hashCode = isSearch == null ? 43 : isSearch.hashCode();
        String name = getName();
        int i2 = (hashCode + 59) * 59;
        int hashCode2 = name == null ? 43 : name.hashCode();
        String type = getType();
        int i3 = (hashCode2 + i2) * 59;
        int hashCode3 = type == null ? 43 : type.hashCode();
        String view = getView();
        int i4 = (hashCode3 + i3) * 59;
        int hashCode4 = view == null ? 43 : view.hashCode();
        String mode = getMode();
        int i5 = (hashCode4 + i4) * 59;
        int hashCode5 = mode == null ? 43 : mode.hashCode();
        String val = getVal();
        int i6 = (hashCode5 + i5) * 59;
        int hashCode6 = val == null ? 43 : val.hashCode();
        String rule = getRule();
        int i7 = (hashCode6 + i6) * 59;
        int hashCode7 = rule == null ? 43 : rule.hashCode();
        String mainField = getMainField();
        int i8 = (hashCode7 + i7) * 59;
        int hashCode8 = mainField == null ? 43 : mainField.hashCode();
        String mainTable = getMainTable();
        int i9 = (hashCode8 + i8) * 59;
        int hashCode9 = mainTable == null ? 43 : mainTable.hashCode();
        String table = getTable();
        int i10 = (hashCode9 + i9) * 59;
        if (table != null) {
            i = table.hashCode();
        }
        return i10 + i;
    }

    public void setIsSearch(Integer isSearch) {
        this.f428g = isSearch;
    }

    public void setMainField(String mainField) {
        this.f429h = mainField;
    }

    public void setMainTable(String mainTable) {
        this.f430i = mainTable;
    }

    public void setMode(String mode) {
        this.f425d = mode;
    }

    public void setName(String name) {
        this.f422a = name;
    }

    public void setRule(String rule) {
        this.f427f = rule;
    }

    public void setTable(String table) {
        this.f431j = table;
    }

    public void setType(String type) {
        this.f423b = type;
    }

    public void setVal(String val) {
        this.f426e = val;
    }

    public void setView(String view) {
        this.f424c = view;
    }

    public String toString() {
        return "OnlineFieldConfig(name=" + getName() + ", type=" + getType() + ", view=" + getView() + ", mode=" + getMode() + ", val=" + getVal() + ", rule=" + getRule() + ", isSearch=" + getIsSearch() + ", mainField=" + getMainField() + ", mainTable=" + getMainTable() + ", table=" + getTable() + ")";
    }

    public String getName() {
        return this.f422a;
    }

    public String getType() {
        return this.f423b;
    }

    public String getView() {
        return this.f424c;
    }

    public String getMode() {
        return this.f425d;
    }

    public String getVal() {
        return this.f426e;
    }

    public String getRule() {
        return this.f427f;
    }

    public Integer getIsSearch() {
        return this.f428g;
    }

    public String getMainField() {
        return this.f429h;
    }

    public String getMainTable() {
        return this.f430i;
    }

    public String getTable() {
        return this.f431j;
    }

    public OnlineFieldConfig() {
    }

    public OnlineFieldConfig(JSONObject jSONObject) {
        String string = jSONObject.getString("field");
        String[] split = string.split(CgformUtil.f231E);
        if (split.length == 1) {
            this.f422a = string;
        } else if (split.length == 2) {
            this.f422a = split[1];
            this.f431j = split[0];
        }
        String string2 = jSONObject.getString("type");
        this.f423b = string2;
        if ("list_multi".equals(string2) || CgformUtil.f239M.equals(string2)) {
            this.f424c = string2;
        }
        this.f427f = jSONObject.getString("rule");
        this.f426e = jSONObject.getString("val");
        this.f425d = CgformUtil.f232F;
        this.f428g = 1;
    }

    public OnlineFieldConfig(OnlCgreportItem onlCgreportItem) {
        this.f422a = onlCgreportItem.getFieldName();
        this.f423b = onlCgreportItem.getFieldType();
        this.f425d = onlCgreportItem.getSearchMode();
        this.f428g = onlCgreportItem.getIsSearch();
    }

    public OnlineFieldConfig(OnlCgformField onlCgformField) {
        this.f422a = onlCgformField.getDbFieldName();
        this.f423b = onlCgformField.getDbType();
        this.f425d = onlCgformField.getQueryMode();
        this.f428g = onlCgformField.getIsQuery();
        this.f429h = onlCgformField.getMainField();
        this.f430i = onlCgformField.getMainTable();
        if ("1".equals(onlCgformField.getQueryConfigFlag())) {
            this.f424c = onlCgformField.getQueryShowType();
        } else {
            this.f424c = onlCgformField.getFieldShowType();
        }
    }
}
